//
//  LTAnchorCollectTableViewCell.m
//  聆听FM
//
//  Created by dllo on 16/6/21.
//  Copyright © 2016年 Dark. All rights reserved.
//

#import "LTAnchorCollectTableViewCell.h"

@implementation LTAnchorCollectTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    self.backView.layer.cornerRadius = 10 * FITHEIGHT;
    self.listImage.transform = CGAffineTransformRotate(self.listImage.transform, M_PI_2);
    UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(didClicked)];
    [self.listImage addGestureRecognizer:tap];
}
- (void)didClicked
{
    self.aBlock(self.model);
}

- (void)setModel:(LTAnchorModel *)model
{
    if (_model != model) {
        _model = model;
        [self.leftImageView sd_setImageWithURL:[NSURL URLWithString:model.smallLogo] placeholderImage:[UIImage sd_animatedGIFNamed:@"占位图"]];
        self.titleLabel.text = model.nickname;
        if (model.title != nil) {
            self.typeLabel.text = model.title;
        }
        else
        {
            self.typeLabel.text = @"我也不知道他是什么类型的";
        }
        
    }
}



- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
